﻿@model DSAAssignment.Models.Register

@{
    ViewBag.Title = "Registration";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Registration</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Register</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Username)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Username)
            @Html.ValidationMessageFor(model => model.Username)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Password)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Password)
            @Html.ValidationMessageFor(model => model.Password)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Email)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Surname)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Surname)
            @Html.ValidationMessageFor(model => model.Surname)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.HouseNo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.HouseNo)
            @Html.ValidationMessageFor(model => model.HouseNo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.StreetName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.StreetName)
            @Html.ValidationMessageFor(model => model.StreetName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TownName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TownName)
            @Html.ValidationMessageFor(model => model.TownName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CountryID)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.CountryID, Model.CountryList)
            @Html.ValidationMessageFor(model => model.CountryList)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.MobileNo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MobileNo)
            @Html.ValidationMessageFor(model => model.MobileNo)
        </div>

        <p>
            <input type="submit" value="Create My Account" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Take me to HomePage","HomePage", "Home")
</div>
